package com.example.plusmaven.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.plusmaven.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.plusmaven.entity.UserDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {
    /**
     * 不分页dto条件查询
     * @param userDto
     * @return
     */
    List<User> selectByDto(@Param("userDto") UserDto userDto);


    /**
     * 支持分页的dto条件查询
     * @param page
     * @param userDto
     * @return
     */
    IPage<User> selectPageByDto(IPage<User> page, @Param("userDto") UserDto userDto);
    IPage<User> selectPageUserandAddress(IPage<User> page, @Param("userDto") UserDto userDto);


}
